// pages/agreement/agreement.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    url: ''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.log(options.type)
    let url = ''
    if (options.hasOwnProperty('type')) {
      if (options.type * 1 === 1) {
        url = 'https://appapi.jzdoctor.com/static_html/agreement_appointment.html'
      }
    } else {
      const { protocolInfo } = getApp().globalData.chooseDetail || {}
      url = (protocolInfo || {}).url
    }
   
    this.setData({
      url: url
    })
  },
})